package com.snake.springboot.custom.service.assemble.login;

import com.snake.springboot.custom.api.model.base.CustomAccountModel;
import com.snake.springboot.custom.api.response.login.MainAccLoginRsp;
import com.snake.springboot.custom.api.response.login.SubAccLoginRsp;
import org.snake.common.utils.PropertyUtils;

/**
 * 类 {@code CustomAccLoginAssembler}  <br> .
 * <p>商户账号组装类
 * <p>创建时间：2025/03/06
 *
 * @author Huang.yj
 */
public class CustomAccLoginAssembler {

    private CustomAccLoginAssembler(){}

    public static CustomAccountModel assembleCustomAccount(MainAccLoginRsp mainAccount){
        CustomAccountModel result = new CustomAccountModel();
        PropertyUtils.copyProperties(result,mainAccount);
        result.setAccountId(mainAccount.getMainAccountId());
        return result;
    }

    public static CustomAccountModel assembleCustomAccount(SubAccLoginRsp subAccount){
        CustomAccountModel result = new CustomAccountModel();
        PropertyUtils.copyProperties(result,subAccount);
        result.setAccountId(subAccount.getSubAccountId());
        return result;
    }

}
